cd /d %~dp0
chcp 65001
cd /d %~dp0
::virtualenv 是一个创建隔绝的Python环境的工具。virtualenv创建一个包含所有必要的可执行文件的文件夹，用来使用Python工程所需的包
:: 若未安装该模块请解开此注释
::pip install virtualenv
::为一个工程创建一个虚拟环境
::virtualenv tensorflow15

call tensorflow15\Scripts\activate

::pip install pillow numpy scipy scikit-image opencv-python==3.4.0.12 tensorflow==1.5.0 keras==2.2.2 flask gevent fire jupyter pydot matplotlib jieba tqdm pyinstaller sklearn pywin32-ctypes requests

rd /s /q "build"
rd /s /q "dist\run"
rd /s /q "dist\trainshell"
rd /s /q "dist\multishell"

call pyinstaller run.py 
call pyinstaller trainshell.py
call pyinstaller multishell.py

xcopy "dist\multishell" "dist\run" /S /E /Y /I
xcopy "dist\trainshell" "dist\run" /S /E /Y /I

xcopy "tensorflow15\lib\site-packages\jedi" "dist\run\jedi" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\jieba" "dist\run\jieba" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\scipy" "dist\run\scipy" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\certifi" "dist\run\certifi" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\chardet" "dist\run\chardet" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\idna" "dist\run\idna" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\jedi" "dist\run\jedi" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\jieba" "dist\run\jieba" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\requests" "dist\run\requests" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\sklearn" "dist\run\sklearn" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\urllib3" "dist\run\urllib3" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\pywt" "dist\run\pywt" /S /E /Y /I
xcopy "tensorflow15\lib\site-packages\gevent" "dist\run\gevent" /S /E /Y /I

xcopy "static" "dist\run\static" /S /E /Y /I
xcopy "templates" "dist\run\templates" /S /E /Y /I

xcopy "config.json" "dist\run" /Y /I
xcopy "chi_sim.txt" "dist\run" /Y /I
xcopy "shells-comm.txt" "dist\run" /Y /I
xcopy "shells-recall.txt" "dist\run" /Y /I
xcopy "shells-AreaDetect.txt" "dist\run"/Y /I
xcopy "shells-all.txt" "dist\run" /Y /I
xcopy "multishell-all.bat" "dist\run" /Y /I
xcopy "ai.exe" "dist\run" /Y /I
xcopy "ai.ini" "dist\run" /Y /I
xcopy "run.bat" "dist\run" /Y /I







